package com.jt.www.enums.issue;


/**
 * 投保类型
 * 区分是新保还是续保标识，y-续保；n-新保
 */
public enum RenewalEnum {
    Y("Y","续保"),
    N("N","新保");

    private String code;
    private String desc;

    RenewalEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }
    public static String getDescByCode(String code){
        for(RenewalEnum statusEnum : RenewalEnum.values()){
            if(statusEnum.code.equals(code)){
                return statusEnum.desc;
            }
        }
        return "";
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
